package com.edu.controller;

import com.edu.service.HobbyService;
import com.edu.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

@Controller
public class HobbyController {

    @Resource
    private HobbyService hobbyService;

    private ModelAndView mv = new ModelAndView();

    @RequestMapping("/hobbyType")
    public Object hobbyType(){
        System.out.println(hobbyService.getAllHobby());
        mv.addObject("hobbyTypes",hobbyService.getAllHobby());
        mv.setViewName("register.jsp");
        return mv;
    }
}
